package com.alibaba.nacos.config.server.jpa.entity;

import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * The type of nacos-all.
 *
 * @author 问道于盲
 * @date 2020-03-12
 */
@Table(name = "NACOS_APP_LIST", uniqueConstraints = {
    @UniqueConstraint(name = "UK_APPNAME", columnNames = "APP_NAME")
})
@Entity
public class AppListEntity extends AbstractEntity {

    private static final long serialVersionUID = 5308590324904826449L;
    @Column(name = "APP_NAME", nullable = false)
    private String appName;

    @Column(name = "IS_DYNAMIC_COLLECT_DISABLED")
    private Integer isDynamicCollectDisabled;

    @Column(name = "LAST_SUB_INFO_COLLECTED_TIME", nullable = false)
    private LocalDateTime lastSubInfoCollectedTime;

    @Column(name = "SUB_INFO_LOCK_OWNER")
    private String subInfoLockOwner;

    @Column(name = "SUB_INFO_LOCK_TIME", nullable = false)
    private LocalDateTime subInfoLockTime;

    /**
     * get appName
     *
     * @return appName
     */
    public String getAppName() {
        return appName;
    }

    /**
     * set appName
     *
     * @param appName appName
     */
    public void setAppName(String appName) {
        this.appName = appName;
    }

    /**
     * get isDynamicCollectDisabled
     *
     * @return isDynamicCollectDisabled
     */
    public Integer getIsDynamicCollectDisabled() {
        return isDynamicCollectDisabled;
    }

    /**
     * set isDynamicCollectDisabled
     *
     * @param isDynamicCollectDisabled isDynamicCollectDisabled
     */
    public void setIsDynamicCollectDisabled(Integer isDynamicCollectDisabled) {
        this.isDynamicCollectDisabled = isDynamicCollectDisabled;
    }

    /**
     * get lastSubInfoCollectedTime
     *
     * @return lastSubInfoCollectedTime
     */
    public LocalDateTime getLastSubInfoCollectedTime() {
        return lastSubInfoCollectedTime;
    }

    /**
     * set lastSubInfoCollectedTime
     *
     * @param lastSubInfoCollectedTime lastSubInfoCollectedTime
     */
    public void setLastSubInfoCollectedTime(LocalDateTime lastSubInfoCollectedTime) {
        this.lastSubInfoCollectedTime = lastSubInfoCollectedTime;
    }

    /**
     * get subInfoLockOwner
     *
     * @return subInfoLockOwner
     */
    public String getSubInfoLockOwner() {
        return subInfoLockOwner;
    }

    /**
     * set subInfoLockOwner
     *
     * @param subInfoLockOwner subInfoLockOwner
     */
    public void setSubInfoLockOwner(String subInfoLockOwner) {
        this.subInfoLockOwner = subInfoLockOwner;
    }

    /**
     * get subInfoLockTime
     *
     * @return subInfoLockTime
     */
    public LocalDateTime getSubInfoLockTime() {
        return subInfoLockTime;
    }

    /**
     * set subInfoLockTime
     *
     * @param subInfoLockTime subInfoLockTime
     */
    public void setSubInfoLockTime(LocalDateTime subInfoLockTime) {
        this.subInfoLockTime = subInfoLockTime;
    }


}
